
var domain = 'https://weixin.bbxpc.com'
// 测试环境
let devConfig = {
  dev: 'test',
  domain: domain,
  filename: 'index-test.html',
  basePath: '/bbx-pubh5-test',
  apiBasePath: '/bbx-pubh5-api-test',
  socketDomain: 'wss://wst.bbxhc.com' 
}
// 灰度环境
let grayConfig = {
  dev: 'gray',
  domain: domain,
  filename: 'index-gray.html',
  basePath: '/bbx-pubh5-gray',
  apiBasePath: '/bbx-pubh5-api-gray',
  socketDomain: 'wss://wss.bbxhc.com'
}
// 正式环境
let prdConfig = {
  dev: 'prd',
  domain: domain,
  filename: 'index-prd.html',
  basePath: '/bbx-pubh5-prd',
  apiBasePath: '/bbx-pubh5-api-prd',
  socketDomain: 'wss://wss.bbxhc.com'
}
function getEnvConfig() {
  let NODE_BBX_ENV = process.env.NODE_BBX_ENV
  if (NODE_BBX_ENV === 'test') {
    return devConfig
  }
  if (NODE_BBX_ENV === 'gray') {
    return grayConfig
  }
  if (NODE_BBX_ENV === 'prd') {
    return prdConfig
  }
  return prdConfig
}
module.exports = getEnvConfig()
// export default[ this.devConfig, this.grayConfig, this.prdConfig ]
